Skip to content

Update Web API Response: status property: add '0' status value #39533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisveness
Copy link

Description

Add status '0' to response values for fetch API response.

Motivation

A 0 response can be seen in addition to the HTTP response status codes indicated.

Additional details

Fetch standard references included in update.

Related issues and pull requests

@chrisveness chrisveness requested a review from a team as a code owner May 15, 2025 12:38
@chrisveness chrisveness requested review from wbamberg and removed request for a team May 15, 2025 12:38
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels May 15, 2025
@@ -17,6 +17,8 @@ For example, `200` for success, `404` if the resource could not be found.
An unsigned short number.
This is one of the [HTTP response status codes](/en-US/docs/Web/HTTP/Reference/Status).

A value is `0` is returned for an [‘opaque’ filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
A value is `0` is returned for an [opaque filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
A value is `0` is returned for an ['opaque' filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).

Copy link
Contributor

Preview URLs

External URLs (1)

URL: /en-US/docs/Web/API/Response/status
Title: Response: status property

@@ -17,6 +17,8 @@ For example, `200` for success, `404` if the resource could not be found.
An unsigned short number.
This is one of the [HTTP response status codes](/en-US/docs/Web/HTTP/Reference/Status).

A value is `0` is returned for an [‘opaque’ filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A value is `0` is returned for an [‘opaque’ filtered response](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) (whose type is `opaque` or `opaqueredirect`), or for a [network error response](https://fetch.spec.whatwg.org/#concept-network-error) (whose type is `error`).
A value is `0` is returned for a response whose {{domxref("Response.type", "type")}} is `opaque`, `opaqueredirect`, or `error`.

(it's better to cross-link to MDN's own documentation for type, which can then explain in one place what the different types mean)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants